<%@ page contentType="text/html" %>
<%@ page pageEncoding="UTF-8" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c" %>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fmt" prefix="fmt" %>

<%@ include file="header.jsp" %>

<c:choose>
<c:when test="hasError">
		<div class="ui-widget">
			<div class="ui-state-error ui-corner-all" style="padding: 0 .7em;"> 
				<p><span class="ui-icon ui-icon-alert" style="float: left; margin-right: .3em;"></span> 
				<strong>Error:</strong> <c:out value="${error}"></c:out>.</p>
			</div>
		</div>
</c:when>
<c:otherwise>		
	<h3>Ranking in your Room for the Category "<c:out value="${category.name}"></c:out>"</h3>
	<br/>	
	<table>
		<tr>
			<th>User</th> <th>Position</th>
		</tr>
		<c:forEach items="${subscriptions}" var="s">
			<tr>
				<td><c:out value="${s.user.name}"/></td>
				<td class="right"><c:out value="${s.score}"/></td>
			</tr>
		</c:forEach>
	</table>
			
</c:otherwise>		
</c:choose>	
<%@ include file="footer.jsp" %>

